#ifndef NET_TICKMANAGER_H_
#define NET_TICKMANAGER_H_

#include <map>
#include <list>

#include "common/common.h"

namespace net {

class ITick;

class TickManager {
private:
    typedef std::list<ITick*> Ticks;
    typedef std::map<uint32_t, Ticks> TickMap; 

public:
    TickManager();
    virtual ~TickManager();

public:
    uint32_t GetTick();
    void OnTick();

    void AddTick(ITick* tick);
    void RemoveTick(ITick* tick);

private:
    uint32_t tick_;

    TickMap tickMap_;
};

}

#endif
